home *** CD-ROM | disk | FTP | other *** search
/ Medabots Cardz / Medabots CD Cardz Metabee.bin / mac / assets / metabee.dxr / 00038_Script_38 < prev    next >
Text File  |  2001-12-07  |  2KB  |  44 lines

  1. property myFile, useronlinee, resetscore
  2. global gotobrassurl, squam, thescore, gNetID, jumbo
  3.  
  4. on beginsprite me
  5.   jumbo = "Pending"
  6.   set gNetID = getNetText ("http://www.nelvana.com/medabots/cookies/checkcookie.pl")
  7. end
  8.  
  9.  
  10. on mouseUp me
  11.   --amended by fez 7/12/01
  12.   --useronline = (the environment).internetConnected 
  13.   --if useronline = #online then
  14.     if jumbo = "Pending" then
  15.       set the blend of sprite(6) = 100
  16.       set the text of member("statusreport") to "Please wait whilst we check you're login status"
  17.     else if jumbo = "user_id=0" then
  18.       set the blend of sprite(6) = 100
  19.       set the text of  member("statusreport") to "You are not registered"
  20.       goToNetPage ("http://www.nelvana.com/medabots/user_reg/register.html")
  21.     else
  22.       if objectP(myFile) then set myFile = 0  --Delete the instance if it already exists
  23.       myFile = new(xtra "fileio")    -- Create an instance of FileIO
  24.       --  openFile (myFile, the moviePath &"info.txt",0)--Open the file with R/W access  
  25.       openFile (myFile, squam&"infom.txt",0)--Open the file with R/W access  
  26.       delete(myFile) --deletes the file
  27.       --  createFile (myFile, the moviePath &"info.txt") --creates the file again
  28.       createFile (myFile, squam&"infom.txt") --creates the file again
  29.       --  openFile(myFile,the moviePath &"info.txt",0) --Open the file with R/W access
  30.       openFile(myFile, squam&"infom.txt",0) --Open the file with R/W access
  31.       --  mySaveString = thescore --puts the contents of the field 'input' into the variable mySaveString
  32.       resetscore = 0
  33.       put resetscore into member("holdscore")
  34.       mySaveString = member("holdscore").text
  35.       writeString(myFile,mySaveString) --writes text to the file
  36.       
  37.       closeFile(myFile) -- Close the file 
  38.       myFile = 0 -- Dispose of the instance
  39.       goToNetPage gotobrassurl, "_new"  
  40.     end if
  41.   --end if
  42. end
  43.  
  44.